package com.ask.forMe.service;

import com.ask.forMe.model.entity.Order;
import com.ask.forMe.model.entity.Result;
import com.baomidou.mybatisplus.extension.service.IService;

public interface OrderService extends IService<Order> {
    /**
     * 处理超时订单
     */
    void processTimeoutOrders();

    /**
     * 生成订单号
     *
     * @return
     */
    String createOrderNo();

    /**
     * 根据订单号查询
     *
     * @param orderNum
     * @return
     */
    Order queryByOrderNum(String orderNum);

    /**
     * 取消订单
     * @param orderNum
     * @return
     */
    Result cancelOrder(String orderNum);
}
